/*
 * @Author: lusx 
 * @Date: 2020-03-02 10:02:54 
 * @Last Modified by: lusx
 * @Last Modified time: 2020-03-02 10:22:49
 */
import {Col} from 'antd';
import Steps from './steps.js';
import LoadingSpinner from '../LoadingSpinner.js';
import { WeaLocaleProvider } from 'ecCom';
const getLabel = WeaLocaleProvider.getLabel;
const prefixCls = "prj-portal";
const Ovreview = props => {
    const {manager, managericons, stages, loading, planbegindate, planenddate} = props.overviewProp;
    if (props.loading && stages.length === 0) {
        return (
            <LoadingSpinner ecId={`${this && this.props && this.props.ecId || ''}_LoadingSpinner@0ynouz`} />
          );
    }
    return (
        <div className={`${prefixCls}-overview-basic-info-layout`} style={{ height: "100%" }}>
            <div className={`${prefixCls}-info-fragment-container`} >
                <div className={`${prefixCls}-info-fragment-head`}>{getLabel('17802','项目负责人')}</div>
                <div  className={`${prefixCls}-info-fragment-body`}>
                    <a href={'javaScript:openhrm(' + manager + ');'} onClick={e => window.pointerXY(e)} >
                        <img src={managericons} className={`${prefixCls}-basic-info-model-icon`} />
                    </a>
                </div>
            </div>
            <div className={`${prefixCls}-info-fragment-container`} >
                <div className={`${prefixCls}-info-fragment-head`}>{getLabel('518321','项目计划周期')}</div>
                <div className={`${prefixCls}-info-fragment-body ${prefixCls}-project-overview-assign-picker`} style={{width:'300px'}}>
                    <i className={`icon-coms-New-schedule ${prefixCls}-basic-info-model-icon`}> {planbegindate} ~ </i>
                    <i className={`icon-coms-New-schedule ${prefixCls}-basic-info-model-icon`}> {planenddate}</i>
                </div>
            </div>
            <div style={{ height: "90px"}} >
                <div className={`${prefixCls}-info-fragment-head`}>{getLabel(26797,"项目阶段")}</div>
                <div className={`${prefixCls}-info-fragment-body ${prefixCls}-steps-content`}>
                    <Steps ecId={`${this && this.props && this.props.ecId || ''}_Steps@ekbk80`} stages={stages} loading={loading} />
                </div>
            </div>
        </div>
    )

}
export default Ovreview;